package com.znsd.exam.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.znsd.entitys.ClassInfo;
import com.znsd.entitys.ExamPlan;
import com.znsd.exam.dao.ExamPlanDao;
import com.znsd.exam.service.ExamPlanService;

/**
  *
  * <p>Title: ExamPlanInfoServiceImpl</p>
  * <p>Description: </p>
  * @author: taohan
  * @date: 2018-8-22
  * @time: 下午4:06:02
  * @version: 1.0
  */

@Service
public class ExamPlanInfoServiceImpl implements ExamPlanService {

	@Autowired
	private ExamPlanDao examPlanInfoMapper;
	
	public List<ExamPlan> getExamPlans(Map<String, Object> map) {
		return examPlanInfoMapper.getExamPlans(map);
	}

	public int addExamPlan(ExamPlan examPlan) {
		return examPlanInfoMapper.isAddExamPlan(examPlan);
	}

	public int updateExamPlan(ExamPlan examPlan) {
		return examPlanInfoMapper.isUpdateExamPlan(examPlan);
	}

	public ExamPlan getExamPlanById(int examPlanId) {
		return examPlanInfoMapper.getExamPlanById(examPlanId);
	}

	//查询学生待考信息
	public List<ExamPlan> getStudentWillExam(Map<String, Object> map) {
		return examPlanInfoMapper.getStudentWillExam(map);
	}

	//移除过期考试安排
	public int removeExamPlan(int examPlanId) {
		return examPlanInfoMapper.isRemoveExamPlan(examPlanId);
	}

	@Override
	public List<ClassInfo> getClasses(ClassInfo clazz) {
		return examPlanInfoMapper.getClasses(clazz);
	}

	@Override
	public List<ExamPlan> getExamPlansTwo() {
		return examPlanInfoMapper.getExamPlansTwo();
	}

	@Override
	public ExamPlan getExamPlanByIdTwo(int examPlanId) {
		return examPlanInfoMapper.getExamPlanByIdTwo(examPlanId);
	}

	@Override
	public int getExamCount(Map<String, Object> map) {
		return examPlanInfoMapper.getExamCount(map);
	}

	@Override
	public List<ExamPlan> getOne(Integer examPaperId) {
		return examPlanInfoMapper.getOne(examPaperId);
	}

	@Override
	public List<ExamPlan> getOneClass(Integer examPaperId) {
		return examPlanInfoMapper.getOneClass(examPaperId);
	}

}
